package syb.air.thp.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class TemperatureHumidityPressureStoreEntry extends StoreEntity {
    @PropertyValue(alias = "温度",description = "温度",unit = "℃",icon=IconConstract.Temperature,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String temperature;

    @PropertyValue(alias = "湿度",description = "湿度",unit = "%RH",icon=IconConstract.Humidity,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String humidity;


    @PropertyValue(alias = "压力",description = "压力",unit = "hPa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String pressure;


    @Override
    public String toString(){
        StringBuilder builder = new StringBuilder ();
        builder.append ("temperature:");builder.append (temperature);builder.append (";");
        builder.append ("humidity:");builder.append (humidity);builder.append (";");
        builder.append ("pressure:");builder.append (pressure);builder.append (";");
        return builder.toString ();
    }
}
